import Http from '../http';

let http = new Http()

export async function walletApi() {
    const wallet:UserWallet = {
        amount : 0,
        rewardAmount : 0
    }
    const { data } = await http.get('userWallet/wallet')
    if(data) {
        wallet.amount = Number(data.amount)
        wallet.rewardAmount = Number(data.rewardAmount)
    }

    return wallet
}

